package com.hissy.common.design.create.factory;

/**
 * Created by zhangyanfei on 2019/4/3.
 * 工厂方法
 * @author zhangyanfei
 * @date 2019/04/03
 */
public class FactoryA implements FactoryMethod {
    private PersonA personA;

    FactoryA() {
        personA = new PersonA();
    }

    @Override
    public AbstractPerson createPerson() {
        return personA;
    }

    @Override
    public void doSomething() {
        personA.doSomething();
    }
}
